package com.company.thread;

/**
 * TODO
 *
 * @author jianf
 * @date 2022年11月08 11:09
 */
public class Example {
    String str = new String("good");
    char[] ch = {'a', 'b', 'c'};

    static void exchage(String str, char[] ch) {
        str = "test ok";
        ch[0] = 'g';
    }

    public static void main(String[] args) {
        int x = getValue(9);
        System.out.println(x);
    }

    public static int getValue(int i) {
        int result = 0;
        switch (i) {
            default:
                result = -1;
            case 5:
            case 1:
                result = result + i;
                break;
            case 2:
                result = result + i * 2;
                break;
            case 3:
                result = result + i * 3;
                break;
        }
        return result;
    }

    public static String getValue(long i) {
        return "abd";
    }
}
